#pragma once
//
//
//  @ Project : Adamantium Project
//  @ File Name : GalaxyMap.h
//  @ Date : 12/5/2012
//  @ Author : 
//
//
#include "TemplateVector.h"
#include "SRMap.h"
#include "Vector2D.h"

#include "BeanieCore.h"
#include "GameTexture.h"
#include "Clickable.h"
//changes by Jason Stewart
#define GRIDLINES_AMMOUNT 9
#define GRIDLINES_MARGIN 60
#define GRIDLINES_COLOUR 0xFF00AA00
#define GALAXY_QUADRANT_SIZE 100
class GalaxyMap {
public:
	void init(BeanieCore * a_core, V2DI * a_galaxyPosition,
		V2DI * a_QuadrantPosition);
	TemplateVector<SRMap*> m_quadrants;//is filled with 100 quadrants
	GalaxyMap();
	TemplateVector<SRMap*> getCurrentLRS(V2DI a_pos);
	~GalaxyMap();
	void release();
	void draw();
	bool m_bDrawGalaxy;//switch between drawing SR map or galaxy map for warp
	void GrabBoundingBox(Clickable &a_box);
	void GrabQuadrantBoxes(Clickable &a_boxes, int a_arrayNum);

	GameTexture * m_pSupernovae;
private:
	V2DI * m_pGalaxyPosition;//within the whole galaxy position, address from map.h
	V2DI * m_pQuadrantPosition;//within the sector position, address from map.h
	BeanieCore * m_core;
	SRMap DarkSpace;

	void setLRSExplored(TemplateVector<SRMap*> &a_quadrants);
	//map, enemy, star, and player textures
	GameTexture m_mapBackground;
	GameTexture m_EnemySprite;
	GameTexture m_StarSprite;


	float backgroundUScale;
	V2DF m_backgroundOffset;
	V2DF m_gridlineTopLeft, m_gridlineTopRight, m_gridlineBottomLeft, m_gridlineBottomRight;
	V2DF m_HGridPointLeft[GRIDLINES_AMMOUNT];
	V2DF m_HGridPointRight[GRIDLINES_AMMOUNT];
	V2DF m_VGridPointTop[GRIDLINES_AMMOUNT];
	V2DF m_VGridPointBottom[GRIDLINES_AMMOUNT];
};